<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改精品课程信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-excellentCourse-edit" th:object="${excellentCourse}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">精品课程名称：</label>
                <div class="col-sm-8">
                    <input name="courseName" th:field="*{courseName}" class="form-control" type="text">
                </div>
            </div>
            <!-- <div class="form-group">
                <label class="col-sm-3 control-label">课程图片：</label>
                <div class="col-sm-8">
                    <textarea name="picture" class="form-control">[[*{picture}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">课程视频：</label>
                <div class="col-sm-8">
                    <textarea name="video" class="form-control">[[*{video}]]</textarea>
                </div>
            </div> -->
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程简介：</label>
                <div class="col-sm-8">
                    <textarea name="introduce" th:field="*{introduce}" class="form-control"></textarea>                    
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('wct_coursr_status')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程价格：</label>
                <div class="col-sm-8">
                    <input name="price" th:field="*{price}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程老师：</label>
                <div class="col-sm-8">
                    <input name="teacherName" th:field="*{teacherName}" class="form-control" type="text">
                </div>
            </div>            
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "course/excellentCourse";
        $("#form-excellentCourse-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-excellentCourse-edit').serialize());
            }
        }
    </script>
</body>
</html>